package com.ktjy.ruoyimes.pro.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ktjy.ruoyimes.pro.mapper.ProProcessMapper;
import com.ktjy.ruoyimes.pro.domain.ProProcess;
import com.ktjy.ruoyimes.pro.service.IProProcessService;

/**
 * 工序设置Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-05-07
 */
@Service
public class ProProcessServiceImpl implements IProProcessService 
{
    @Autowired
    private ProProcessMapper proProcessMapper;

    /**
     * 查询工序设置
     * 
     * @param processId 工序设置主键
     * @return 工序设置
     */
    @Override
    public ProProcess selectProProcessByProcessId(Long processId)
    {
        return proProcessMapper.selectProProcessByProcessId(processId);
    }

    /**
     * 查询工序设置列表
     * 
     * @param proProcess 工序设置
     * @return 工序设置
     */
    @Override
    public List<ProProcess> selectProProcessList(ProProcess proProcess)
    {
        return proProcessMapper.selectProProcessList(proProcess);
    }

    /**
     * 新增工序设置
     * 
     * @param proProcess 工序设置
     * @return 结果
     */
    @Override
    public int insertProProcess(ProProcess proProcess)
    {
        proProcess.setCreateTime(DateUtils.getNowDate());
        return proProcessMapper.insertProProcess(proProcess);
    }

    /**
     * 修改工序设置
     * 
     * @param proProcess 工序设置
     * @return 结果
     */
    @Override
    public int updateProProcess(ProProcess proProcess)
    {
        proProcess.setUpdateTime(DateUtils.getNowDate());
        return proProcessMapper.updateProProcess(proProcess);
    }

    /**
     * 批量删除工序设置
     * 
     * @param processIds 需要删除的工序设置主键
     * @return 结果
     */
    @Override
    public int deleteProProcessByProcessIds(Long[] processIds)
    {
        return proProcessMapper.deleteProProcessByProcessIds(processIds);
    }

    /**
     * 删除工序设置信息
     * 
     * @param processId 工序设置主键
     * @return 结果
     */
    @Override
    public int deleteProProcessByProcessId(Long processId)
    {
        return proProcessMapper.deleteProProcessByProcessId(processId);
    }
}
